package com.voute.Api;

import com.voute.Model.Bean.BaseBean;
import com.voute.Model.Bean.FeedCommentBean;
import com.voute.Model.Bean.FeedDetailInfoBean;
import com.voute.Model.Bean.VoteResultBean;

import java.util.HashMap;

import retrofit2.http.Field;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;
import retrofit2.http.Query;
import rx.Observable;

/**
 * Created by liucxu on 2017/4/28.
 */

public interface FeedDetailInfoService {
    @GET("v1/feeds/{hash}")
    Observable<FeedDetailInfoBean> queryFeedDetailInfo(@Path("hash") String feed_hash);
    @FormUrlEncoded
    @POST("v1/feeds/{hash}/vote")
    Observable<VoteResultBean> voteFeed(@Path("hash") String hash, @FieldMap HashMap<String,String> params);
    @GET("v1/feeds/{hash}/comments")
    Observable<FeedCommentBean> queryMoreComments(@Path("hash") String hash, @Query("page") String page);
    @FormUrlEncoded
    @POST("v1/comments/{cid}/vote")
    Observable<BaseBean> upVote(@Path("cid") String cid, @Field("value") String value);
    @FormUrlEncoded
    @POST("v1/feeds/{hash}/report")
    Observable<BaseBean> reportFeed(@Path("hash") String cid, @Field("reason") String value);
}
